package com.randy.fundation;

public class JxAssert {
    public static void notNull(Object condition) {
        if (BuildConfig.DEBUG && (condition == null)) {
            throw new AssertionError();
        }
    }

    public static void notNull(Object condition, String message) {
        if (BuildConfig.DEBUG && (condition == null)) {
            throw new AssertionError(message);
        }
    }

    public static void notNull(Object condition, Object message) {
        if (BuildConfig.DEBUG && (condition == null)) {
            throw new AssertionError(message);
        }
    }

    public static void sure(boolean condition) {
        if (BuildConfig.DEBUG && !(condition)) {
            throw new AssertionError();
        }
    }

    public static void sure(boolean condition, String message) {
        if (BuildConfig.DEBUG && !(condition)) {
            throw new AssertionError(message);
        }
    }

    public static void sure(boolean condition, Object message) {
        if (BuildConfig.DEBUG && !(condition)) {
            throw new AssertionError(message);
        }
    }

    public static void not(boolean condition) {
        if (BuildConfig.DEBUG && (condition)) {
            throw new AssertionError();
        }
    }

    public static void not(boolean condition, String message) {
        if (BuildConfig.DEBUG && (condition)) {
            throw new AssertionError(message);
        }
    }

    public static void not(boolean condition, Object message) {
        if (BuildConfig.DEBUG && (condition)) {
            throw new AssertionError(message);
        }
    }

    public static void failed() {
        if (BuildConfig.DEBUG) {
            throw new AssertionError();
        }
    }

    public static void failed(String message) {
        if (BuildConfig.DEBUG) {
            throw new AssertionError(message);
        }
    }

    public static void failed(Object message) {
        if (BuildConfig.DEBUG) {
            throw new AssertionError(message);
        }
    }
}
